home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / swag / egavga.swg / 0057_VGA Wait for retrace.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-08-27  |  439 b   |  16 lines

  1. {
  2. > Does anybody know how to wait for the retrace before drawing a new
  3. > screen to eliminate flicker?
  4.  
  5. Here's the procedure from a PD unit called SuperVGA (by Steve Madsen):
  6.  
  7. Waits for a verticle retrace to complete before exiting.  Useful
  8. for reducing flicker in video intensive operations, like color cycling.
  9. }
  10.  
  11. PROCEDURE WaitRetrace;
  12. begin
  13.   while ((Port[$3DA] AND 8) > 0) do;
  14.   while ((Port[$3DA] AND 8) = 0) do;
  15. end;
  16.